Repository navigation
Query Hooks Improvements - #5681
Merged
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
bjoernricks
force-pushed
the
query-hooks-improvements
branch
from
October 7, 2026 05:50
cfe5a3d to
78fd148
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5681 +/- ##
==========================================
+ Coverage 87.60% 87.68% +0.07%
==========================================
Files 1306 1322 +16
Lines 34302 34437 +135
Branches 10295 10329 +34
==========================================
+ Hits 30051 30195 +144
+ Misses 3844 3837 -7
+ Partials 407 405 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Use dedicated modules for single and multiple entity query hooks.
Use dedicated modules for single and multiple entity query hooks.
Ensure when cloning and deleting tickets via their query hooks a notification message is displayed.
Use dedicated describe blocks for each hook and use real model instances in the tests.
Ensure when cloning and deleting users via their query hooks a notification message is displayed.
Allow to query Target data via use query hooks.
As query hooks might not return a response object and instead the data directly the goToDetails function needs to support this use case.
Refactor TargetComponent to use the new query hooks for target.
Before the changed port list was re-loaded after a port range was deleted. This is completely unnecessary and also created several additional requests when a user deleted several port ranges in the dialog.
Allow to query and mutate port lists via query hooks.
Use the new port list query hooks within the PortListComponent.
Implement the basic set of query hooks for credentials.
Update TargetComponent and TargetDialog to use the new port list and credential query hooks internally instead of directly querying the gmp API.
Entity and entities queries are separated everywhere else already.
For deleting a user an additional input argument is required.
It's not required for GMP.
…ssage Ensure that the name argument is passed by default and the type checker complains about it. This ensure the success message is displayed correctly.
Use useDeleteMutation and adapt arguments to recent changes.
One for tag and one for tags queries.
One for agent and one for agents queries.
All save methods of commands should just return a Promise<void> because it just updates the current entity.
This new interface will be re used in a query hook.
Always behave the same for all single entity query hooks. Clone and create return EntityActionData. Save and delete just return void.
bjoernricks
force-pushed
the
query-hooks-improvements
branch
from
October 7, 2026 07:51
f73daf8 to
d95c145
Compare
bjoernricks
marked this pull request as ready for review
October 7, 2026 07:52
greenbonebot
enabled auto-merge (rebase)
October 7, 2026 07:52
daniele-mng
reviewed
Oct 7, 2026
Show success message and don't call onImported and onImportError handlers twice.
daniele-mng
reviewed
Oct 7, 2026
Co-authored-by: Daniele Mangiagli <daniele.mangiagli@greenbone.net>
daniele-mng
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Query Hooks Improvements
Extend and improve the query hooks to make them consistent.
Why
We should have one dedicated API for querying data. This means we should get rid of
Checklist